import request from "../utils/reuqest.js";
// 登录
export const api_login=(data)=>request.post("login",data);
//用户列表
export const api_query=data=>request.get("users",data)
//修改用户状态
export const api_state=({uId,type})=>request.put(`users/${uId}/state/${type}`)
//分配角色的api
export const api_setRole=(data)=>request.put(`users/${data.uId}/role`,data)
//添加用户
export const api_users=(data)=>request.post("users",data)
//删除用户
export const api_del=(data)=>request.delte(`users/${data.id}`,data)
export const api_xg=(data)=>request.put(`users/${data.id}`,data)